package com.bang.study.jvm.produceCas;

/**
 * @ClassName: ProductCase1
 * @Desc: TODO
 * @author: BANG
 * @Date: 2019/10/18 08:41
 * @Version: 1.0
 * @Modified By:
 */
public class AfterProductCase1 {


    /**
     *
     * @param args
     * @throws Exception
     * @Vm参数 -XX:NewSize=209715200 -XX:MaxNewSize=209715200 -XX:InitialHeapSize=314572800 -XX:MaxHeapSize=314572800 -XX:SurvivorRatio=2  -XX:MaxTenuringThreshold=15 -XX:PretenureSizeThreshold=20971520 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:aftergc.log
     */
    public static void main(String[] args) throws Exception {
        Thread.sleep(30000);
        System.out.println("开始执行------------------------>>");
        while (true) {
            loadData();
        }

    }

    private static void loadData() throws Exception{
        byte[] data = null;
        for (int i = 0; i < 4; i++) {
            data = new byte[10 * 1024 * 1024];
        }

        data = null;

        byte[] data1 = new byte[10 * 1024 * 1024];
        byte[] data2 = new byte[10 * 1024 * 1024];

        byte[] data3 = new byte[10 * 1024 * 1024];
        data3 = new byte[10 * 1024 * 1024];
        Thread.sleep(1000);

    }
}
